package dom;

import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;

public class Implication {
	Predicate implies;
	Set<Predicate> impliedPredicateSet;
	
	public Implication(Predicate implies){
		this.implies = implies;
		impliedPredicateSet = new HashSet<Predicate>();
	}
	public Implication(Predicate implies,Set<Predicate> impliedPredicates){
		this.implies = implies;
		this.impliedPredicateSet = impliedPredicates;
	}
	
	public void addImpliedElement(Predicate impliedElement){
		if(implies.getId() != impliedElement.getId()){
			impliedPredicateSet.add(impliedElement);
		}
	}
	public Predicate getImplyingElement(){
		return implies.clone();
	}
	public LinkedList<Predicate> getImpliedElements(){
		return new LinkedList<Predicate>(impliedPredicateSet);
	}
}
